package com.xh.clean.modular.clean.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 巡视表
 * </p>
 *
 * @author 杨杰123
 * @since 2018-06-24
 */
@TableName("sys_patrol")
public class Patrol extends Model<Patrol> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 创建人
     */
    private Integer creater;
    /**
     * 巡视区域ID
     */
    @TableField("parea_id")
    private Integer pareaId;
    /**
     * 巡视结果
     */
    private String remark;
    /**
     * 巡视时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("patrol_date")
    private Date patrolDate;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 办公楼ID 【临时属性】
     */
    @TableField(exist = false)
    private Integer storeyId;
    /**
    * @Description: 巡视区域类型【临时属性】
    * @Param: 
    * @return: 
    * @Author: 杨杰
    * @Date: 2018/7/9  22:23
    */ 
    @TableField(exist = false)
    private Integer type;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCreater() {
        return creater;
    }

    public void setCreater(Integer creater) {
        this.creater = creater;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getPatrolDate() {
        return patrolDate;
    }

    public void setPatrolDate(Date patrolDate) {
        this.patrolDate = patrolDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Integer getStoreyId() {
        return storeyId;
    }

    public void setStoreyId(Integer storeyId) {
        this.storeyId = storeyId;
    }

    public Integer getPareaId() {
        return pareaId;
    }

    public void setPareaId(Integer pareaId) {
        this.pareaId = pareaId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "Patrol{" +
        "id=" + id +
        ", creater=" + creater +
        ", remark=" + remark +
        ", patrolDate=" + patrolDate +
        ", createDate=" + createDate +
        "}";
    }
}
